<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>仿billbill网站</title>
    <link rel="stylesheet" href="//at.alicdn.com/t/c/font_4536705_shlpl0p0nk.css">
    <link rel="stylesheet" href="css/轮播图.css" type="text/css">
</head>
<style>
    a {
        text-decoration: none;
    }
</style>

<body>
    <header>
        <img src="image/樱花飘落.webp" alt="">
        <div class="nav1" id="nav1">
            <ul>
                <li id="nav2"><a href="" target="_blank">首页</a></li>
                <li><a href="" target="_blank">番剧</a></li>
                <li><a href="" target="_blank">直播</a></li>
                <li><a href="" target="_blank">游戏中心</a></li>
                <li><a href="" target="_blank">会员购</a></li>
                <li><a href="" target="_blank">漫画</a></li>
                <li><a href="" target="_blank">赛事</a></li>
                <li>
                    <input id="search-text" type="search" placeholder="请输入关键字">
                    <span class="iconfont icon-sousuo" id="search"></span>
                </li>
                <li><a href="" target="_blank">大会员</a></li>
                <li><a href="" target="_blank">消息</a></li>
                <li><a href="" target="_blank">收藏</a></li>
                <li><a href="" target="_blank">历史</a></li>
                <li><a id="deng" href="登录.html" target="_blank">登录</a></li>
                <li><a id="zhu" href="注册.html" target="_blank">注册</a></li>
                <style>
                    #customer {
                        border-radius: 50%;
                        width: 40px;
                        height: 40px;
                        margin-left: 30px;
                        display: none;
                    }

                    #customerName {
                        display: none;
                    }
                </style>
                <li><a style="display: flex;" href="注册.html" target="_blank"><img id="customer" src="image/小电视.webp"
                            alt=""><span class="customerName" id="customerName"></span></a></li>
            </ul>
        </div>
    </header>
    <div class="main">
        <div class="carousel">
            <img id="carousel-img" src="image/凑数.webp" alt="" style="position: relative;;">
            <div id="left"> <span class="iconfont icon-zuozuo-"></span></div>
            <div id="right"> <span class="iconfont icon-youyou-"></span></div>
            <ul>
                <li class="btn"></li>
                <li class="btn"></li>
                <li class="btn"></li>
                <li class="btn"></li>
                <li class="btn"></li>
                <li class="btn"></li>

            </ul>
        </div>
        <div class="container">
            <img src="image/凑数.webp" alt="">
            <img src="image/凑数2.webp" alt="">
            <img src="image/凑数3.webp" alt="">
            <img src="image/凑数4.webp" alt="">
            <img src="image/凑数5.webp" alt="">
            <img src="image/凑数6.webp" alt="">
        </div>
    </div>
    <h2>视频专区</h2>
    <h3 id="intro">登录后观看</h3>
    <hr>
    <style>
        #videoArea {
            display: none;
            flex-wrap: wrap;
            margin-left: 0px;
            justify-content: space-between;
        }

        #videoArea>div>div {

            margin-left: 50px;

        }

        #videoArea>div>div>a {
            display: flex;
            flex-direction: column;
            text-align: center;
        }

        #videoArea>div>div>a>img {
            width: 250px;
            height: 220px;
            transition: all 0.4s ease;
        }
    </style>
    <div id="videoArea">
        <div>
            <div><a
                    href="https://www.bilibili.com/video/BV1j94y1674c/?spm_id_from=333.337.search-card.all.click&vd_source=6f4b3c43be3dc4f105a985362d1dce81"><img
                        src="image/1999广告.webp" alt="">
                    <span>广告1</span>
                </a>

            </div>
        </div>
        <div>
            <div><a
                    href="https://www.bilibili.com/video/BV1LeTwesEK7/?spm_id_from=333.337.search-card.all.click&vd_source=6f4b3c43be3dc4f105a985362d1dce81"><img
                        src="image/1999广告2.webp" alt="">
                    <span>广告2</span>
                </a></div>
        </div>
        <div>
            <div><a
                    href="https://www.bilibili.com/video/BV1vT421a7xq/?spm_id_from=333.337.search-card.all.click&vd_source=6f4b3c43be3dc4f105a985362d1dce81"><img
                        src="image/1999广告3.webp" alt="">
                    <span>广告3</span>
                </a></div>
        </div>
        <div>
            <div><a
                    href="https://www.bilibili.com/video/BV1Ej411m7pe/?spm_id_from=333.337.search-card.all.click&vd_source=6f4b3c43be3dc4f105a985362d1dce81"><img
                        src="image/1999广告4.webp" alt="">
                    <span>广告4</span>
                </a></div>
        </div>
        <div>
            <div><a
                    href="https://www.bilibili.com/video/BV1RK411x7sF/?spm_id_from=333.337.search-card.all.click&vd_source=6f4b3c43be3dc4f105a985362d1dce81"><img
                        src="image/1999广告5.webp" alt="">
                    <span>广告5</span>
                </a></div>
        </div>
        <div>
            <div><a
                    href="https://www.bilibili.com/video/BV1nm4y1N7ZU/?spm_id_from=333.337.search-card.all.click&vd_source=6f4b3c43be3dc4f105a985362d1dce81"><img
                        src="image/1999广告6.webp" alt="">
                    <span>广告6</span>
                </a></div>
        </div>
        <div>
            <div><a
                    href="https://www.bilibili.com/video/BV1WH4y1R7r9/?spm_id_from=333.337.search-card.all.click&vd_source=6f4b3c43be3dc4f105a985362d1dce81"><img
                        src="image/1999广告7.webp" alt="">
                    <span>广告7</span>
                </a></div>
        </div>
        <div>
            <div><a
                    href="https://www.bilibili.com/video/BV1Lu4y1L7HA/?spm_id_from=333.337.search-card.all.click&vd_source=6f4b3c43be3dc4f105a985362d1dce81"><img
                        src="image/1999广告8.webp" alt="">
                    <span>广告8</span>
                </a></div>
        </div>


    </div>
    <script src="js/轮播图.js"></script>
    <script>
        if (localStorage.getItem("passWord") != null && localStorage.getItem("accountNumber") != null) {
            customer.style.display = "block"
            document.getElementById("customerName").style.display = "block"
            document.getElementById("customerName").innerHTML = "用户" + localStorage.getItem("accountNumber")
            document.getElementById("customerName").style.margin = "none"
            document.getElementById("intro").style.display = "none"
            document.getElementById("videoArea").style.display = "flex"
            document.getElementById("deng").style.display = "none"
            document.getElementById("zhu").style.display = "none"
        }
        document.getElementById("search").onclick = function () {
            let content = document.getElementById("search-text").value
            console.log(content)
            console.log(content.includes("广告"))
            if (content == "广告1") {
                window.open("https://www.bilibili.com/video/BV1j94y1674c/?spm_id_from=333.337.search-card.all.click&vd_source=6f4b3c43be3dc4f105a985362d1dce81")

            } else if (content == "广告2") {
                window.open("https://www.bilibili.com/video/BV1j94y1674c/?spm_id_from=333.337.search-card.all.click&vd_source=6f4b3c43be3dc4f105a985362d1dce81")

            }
            else if (content == "广告3") {
                window.open("https://www.bilibili.com/video/BV1vT421a7xq/?spm_id_from=333.337.search-card.all.click&vd_source=6f4b3c43be3dc4f105a985362d1dce81")

            }
            else if (content == "广告4") {
                window.open("https://www.bilibili.com/video/BV1Ej411m7pe/?spm_id_from=333.337.search-card.all.click&vd_source=6f4b3c43be3dc4f105a985362d1dce81")

            }
            else if (content == "广告5") {
                window.open("https://www.bilibili.com/video/BV1RK411x7sF/?spm_id_from=333.337.search-card.all.click&vd_source=6f4b3c43be3dc4f105a985362d1dce81")

            }
            else if (content == "广告6") {
                window.open("https://www.bilibili.com/video/BV1nm4y1N7ZU/?spm_id_from=333.337.search-card.all.click&vd_source=6f4b3c43be3dc4f105a985362d1dce81")

            }
            else if (content == "广告7") {
                window.open("https://www.bilibili.com/video/BV1WH4y1R7r9/?spm_id_from=333.337.search-card.all.click&vd_source=6f4b3c43be3dc4f105a985362d1dce81")

            }
            else if (content == "广告8") {
                window.open("https://www.bilibili.com/video/BV1Lu4y1L7HA/?spm_id_from=333.337.search-card.all.click&vd_source=6f4b3c43be3dc4f105a985362d1dce81")

            }
            else {
                alert("没有相关内容")
            }
        }
        console.log(localStorage.getItem("passWord"))
    </script>
</body>

</html>